package com.marvels.approve.process.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.marvels.approve.process.service.FaceSigTaskletApi;
import com.marvels.common.utils.MarvelsLogUtil;

/**
 * 视频面签定时任务控制类
 * @author zhaosa
 *
 */
@RestController
@RequestMapping("approve/spmq/batch/api")
public class FaceSigBatchController {
	@Autowired
	private FaceSigTaskletApi faceSigTaskletApi;
	
	@RequestMapping("/scanOutmoded")
	public void scanOutmoded(){
		try {
			MarvelsLogUtil.getInstance().info("======》视频面签更新为已过号开始执行");
			faceSigTaskletApi.scanOutmoded();
			MarvelsLogUtil.getInstance().info("======》视频面签更新为已过号始执行结束");
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("======》视频面签更新为已过号异常："+e);
		}
	}
	@RequestMapping("/scanNeedTips")
	public void scanNeedTips(){
		try {
			MarvelsLogUtil.getInstance().info("======》视频面签推送提醒开始执行");
			faceSigTaskletApi.scanNeedTips();
			MarvelsLogUtil.getInstance().info("======》视频面签推送提醒执行结束");
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("======》视频面签推送提醒异常："+e);
		}
	}
	@RequestMapping("/updateTimeConfHistoryStatus")
	public void updateTimeConfHistoryStatus(){
		try {
			MarvelsLogUtil.getInstance().info("======》面签时间配置状态更新开始执行");
			faceSigTaskletApi.updateTimeConfHistoryStatus();
			MarvelsLogUtil.getInstance().info("======》面签时间配置状态更新执行结束");
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("======》面签时间配置状态更新异常："+e);
		}
	}
	
}
